home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TranslationExtensions.h
-
- Copyright: © 1984-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Version: Built by: anonymous
- From: TranslationExtensions.i, revision 4, dated 5/31/94
- With Interfacer: 1.1d4e2
-
- Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- List the version information from above in Problem Description.
-
- */
-
- #ifndef __TRANSLATIONEXTENSIONS__
- #define __TRANSLATIONEXTENSIONS__
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define kSupportsFileTranslation 1
-
- #define kSupportsScrapTranslation 2
-
- #define kTranslatorCanGenerateFilename 4
-
- #ifndef REZ
-
- #ifndef __MEMORY__
- #include <Memory.h>
- #endif
- /* #include <Types.h> */
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
- /* #include <OSUtils.h> */
- /* #include <SegLoad.h> */
-
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
-
- #ifndef __COMPONENTS__
- #include "Components.h"
- #endif
- typedef OSType FileType;
-
- typedef ResType ScrapType;
-
- typedef unsigned long TranslationAttributes;
-
- #define taDstDocNeedsResourceFork 1
-
- #define taDstIsAppTranslation 2
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FileTypeSpec {
- FileType format;
- long hint;
- TranslationAttributes flags;
- OSType catInfoType;
- OSType catInfoCreator;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FileTypeSpec FileTypeSpec;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FileTranslationList {
- unsigned long modDate;
- unsigned long groupCount;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FileTranslationList FileTranslationList;
-
- typedef FileTranslationList *FileTranslationListPtr, **FileTranslationListHandle;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct ScrapTypeSpec {
- ScrapType format;
- long hint;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct ScrapTypeSpec ScrapTypeSpec;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct ScrapTranslationList {
- unsigned long modDate;
- unsigned long groupCount;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct ScrapTranslationList ScrapTranslationList;
-
- typedef ScrapTranslationList *ScrapTranslationListPtr, **ScrapTranslationListHandle;
-
- typedef long TranslationRefNum;
-
- extern pascal OSErr SetTranslationAdvertisement(TranslationRefNum refNum, PicHandle advertisement)
- TWOWORDINLINE(0x7002, 0xABFC);
- extern pascal OSErr UpdateTranslationProgress(TranslationRefNum refNum, short percentDone, Boolean *canceled)
- TWOWORDINLINE(0x7001, 0xABFC);
-
- enum {
- kTranslateGetFileTranslationList = 0,
- kTranslateIdentifyFile,
- kTranslateTranslateFile,
- kTranslateGetTranslatedFilename,
- kTranslateGetScrapTranslationList = 10,
- kTranslateIdentifyScrap,
- kTranslateTranslateScrap
- };
-
- typedef pascal ComponentResult (*DoGetFileTranslationListProcPtr)(ComponentInstance self, FileTranslationListHandle translationList);
- typedef pascal ComponentResult (*DoIdentifyFileProcPtr)(ComponentInstance self, const FSSpec *theDocument, FileType *docType);
- typedef pascal ComponentResult (*DoTranslateFileProcPtr)(ComponentInstance self, TranslationRefNum refNum, const FSSpec *sourceDocument, FileType srcType, long srcTypeHint, const FSSpec *dstDoc, FileType dstType, long dstTypeHint);
- typedef pascal ComponentResult (*DoGetTranslatedFilenameProcPtr)(ComponentInstance self, FileType dstType, long dstTypeHint, FSSpec *theDocument);
- typedef pascal ComponentResult (*DoGetScrapTranslationListProcPtr)(ComponentInstance self, ScrapTranslationListHandle list);
- typedef pascal ComponentResult (*DoIdentifyScrapProcPtr)(ComponentInstance self, const void *dataPtr, Size dataLength, ScrapType *dataFormat);
- typedef pascal ComponentResult (*DoTranslateScrapProcPtr)(ComponentInstance self, TranslationRefNum refNum, const void *srcDataPtr, Size srcDataLength, ScrapType srcType, long srcTypeHint, Handle dstData, ScrapType dstType, long dstTypeHint);
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TRANSLATIONEXTENSIONS__ */
-